It is known to provide an optical element with a polarizing function by successively producing, on one surface of this element, an orienting first layer and a polarizing second layer comprising dichroic compounds. The dichroic compounds of the second layer have an angular orientation determined by the first layer. Such a method makes it possible to obtain an optical element having a high transmission contrast for polarized light. As is known, such a contrast is defined as the ratio of the transmission coefficient for light polarized parallel to the direction of the dichroic compounds to the transmission coefficient for light polarized perpendicular to this direction. Furthermore, the optical quality and the optical appearance of the polarizing optical element obtained in this way are satisfactory and compatible with many uses, especially ophthalmic use.